home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Technotools
/
Technotools (Chestnut CD-ROM)(1993).ISO
/
lang_c
/
cug172
/
impure.c
< prev
next >
Wrap
C/C++ Source or Header
|
1986-02-05
|
2KB
|
86 lines
/*
HEADER: CUG nnn.nn;
TITLE: LEX - A Lexical Analyser Generator
VERSION: 1.0 for IBM-PC
DATE: Jan 30, 1985
DESCRIPTION: A Lexical Analyser Generator. From UNIX
KEYWORDS: Lexical Analyser Generator YACC C PREP
SYSTEM: IBM-PC and Compatiables
FILENAME: IMPURE.C
WARNINGS: This program is not for the casual user. It will
be useful primarily to expert developers.
CRC: N/A
SEE-ALSO: YACC and PREP
AUTHORS: Scott Guthery 11100 leafwood lane Austin, TX 78750
COMPILERS: DESMET-C
REFERENCES: UNIX Systems Manuals
*/
/*
* impure.c -- Impure data for ytab.c and min.c
*
* Created 02-Dec-80 Bob Denny -- Impure data from ytab.c and min.c moved
* here so they can reside in overlays.
* More 19-Mar-82 Bob Denny -- New C library & compiler
* More 20-Nov-83 Scott Guthery -- Adapt for IBM PC & DeSmet C
*/
#include <stdio.h>
#include "lexlex.h"
#include "ytab.h"
/*
* min's
*/
struct set **oldpart;
int **newpart;
int nold;
int nnew;
/*
* ytab's
*/
struct nlist {
struct nlist *nl_next;
struct nfa *nl_base;
struct nfa *nl_end;
struct nfa *nl_start;
struct nfa *nl_final;
} *nlist;
#ifndef YYSTYPE
#define YYSTYPE int
#endif
YYSTYPE yyval = 0;
YYSTYPE *yypv;
YYSTYPE yylval = 0;
int nlook = 0;
int yyline = 0;
char *breakc;
char *ignore;
char *illeg;
char buffer[150];
int str_length;
char ccl[(NCHARS+1)/NBPC];
/*
* Copied from ytab.c just before yyparse() ... kludgy.
*/
#define YYMAXDEPTH 150
/*
* These are impure data for the parser driver yyparse().
*/
int yydebug = 0; /* Make this 1 for yyparse() debugging */
YYSTYPE yyv[YYMAXDEPTH];
int yychar = -1;
int yynerrs = 0;
int yyerrflag = 0;